package com.bawei.shopping2

import com.google.gson.Gson
import okhttp3.MediaType
import okhttp3.RequestBody
//MutableMap扩展函数
fun <T1,T2> MutableMap<T1,T2>.toBody():RequestBody{
    var  str = Gson().toJson(this)
    return RequestBody.create(MediaType.parse("application/json;charset=utf-8"),str)
}